package com.momo.web.controller.product;

import com.momo.common.common.JSONResult;
import com.momo.common.req.product.BugReq;
import com.momo.service.product.SysBugService;
import com.momo.web.controller.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * Created by MOMO on 2019/4/25.
 */
@RestController
@RequestMapping(value = "/platform/product", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
@Slf4j
public class SysBugCongroller extends BaseController {
    @Autowired
    private SysBugService sysBugService;

    @RequestMapping("/bugPage/v1")
    public JSONResult bugPage(@RequestBody BugReq bugReq) {
        return sysBugService.bugPage(bugReq, redisUser());
    }
    @RequestMapping("/save/v1")
    public JSONResult save(@Validated(BugReq.save.class)@RequestBody BugReq bugReq) {
        return sysBugService.save(bugReq, redisUser());
    }
}
